<template>
    <div>
        <van-nav-bar title="服务记录" left-text="返回" left-arrow @click-left="$router.back()" />
        <MyDeal v-for="item, index in dealList" :key="index" :dealInfo="item"></MyDeal>
    </div>
</template>

<script>
import MyDeal from '@/components/MyDeal'
export default {
    name: "Deal",
    components:{
        MyDeal
    },
    data() {
        return {
            dealList: []
        }
    },
    mounted() {
        this.init()
    },
    methods: {
        async init(){
            let res = await this.$store.dispatch('getDealInfo')
            if(res.success) this.dealList = res.data
            else this.$myFun.resError(res.message)
        }
    },
}
</script>

<style scoped></style>